﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication2.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div type="Integer">
            姓名：<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="账户不能为admin" ControlToValidate="TextBox1" OnServerValidate="CustomValidator1_ServerValidate" Display="Dynamic"></asp:CustomValidator>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="账号不能为空！" Display="Dynamic" ControlToValidate="TextBox1" Font-Bold="True" Font-Size="Larger"></asp:RequiredFieldValidator>
            <br />
            密码：<asp:TextBox ID="TextBox2" runat="server" ControlToCompare="TextBox2"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="密码不能为空" ControlToValidate="TextBox2"></asp:RequiredFieldValidator>
            <br />
            密码确认：<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
            <asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="两次密码输入不一致" Display="Dynamic" ControlToCompare="TextBox2" ControlToValidate="TextBox3"></asp:CompareValidator>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="密码不能为空"  ControlToValidate="TextBox3"></asp:RequiredFieldValidator>
            <br />
            年龄:<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
            <asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="年龄必须在1-200之间" MaximumValue="200" MinimumValue="1" Type="Integer" ControlToValidate="TextBox4"></asp:RangeValidator>
            <br />
            出生日期：<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
            <asp:RangeValidator ID="RangeValidator2" runat="server" ErrorMessage="当前时间超出1990-01-01" ControlToValidate="TextBox5" MinimumValue="1990-01-01" Type="Date" Display="Dynamic"></asp:RangeValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="日期格式必须为2000-01-01" ControlToValidate="TextBox5" ValidationExpression ="\d{4}-\d{2}-\d{2}"></asp:RegularExpressionValidator>
            <br />
            毕业日期：<asp:TextBox ID="TextBox6" runat="server"></asp:TextBox>
            <asp:CompareValidator ID="CompareValidator2" runat="server" ErrorMessage="出生时间不能大于或等于出生时间" ControlToCompare="TextBox5" ControlToValidate="TextBox6" Operator ="GreaterThan" Type="Date"></asp:CompareValidator>
            <br />
           电子邮件：<asp:TextBox ID="TextBox7" runat="server"></asp:TextBox>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="电子邮件格式不正确" ControlToValidate="TextBox7" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
            <br />
            头像:<asp:FileUpload ID="ful" runat="server" />
            <asp:CustomValidator ID="CustomValidator2" runat="server" ErrorMessage="CustomValidator" ControlToValidate="ful"></asp:CustomValidator>
            <br />
            <asp:Image ID="Image1" runat="server" />
            <br />

            <asp:Button ID="Button1" runat="server" Text="提交" OnClick="Button1_Click" />
            <asp:Literal ID="Literal1" runat="server"></asp:Literal>
            <br />
            <asp:ValidationSummary ID="ValidationSummary1" runat="server" DisplayMode="SingleParagraph" ShowMessageBox="True" />
        </div>
    </form>
</body>
</html>
